Open
Conversation
Member
|
|
|
不能这样修,这样会导致部分蓝图脚本字节码执行出问题从而导致偶现崩溃。建议还是直接从业务侧规避。 |
@DarcJC, can you kindly provide an example case to reproduce the crash. So far we haven't encounter any crash since it will only redirect calls to the LUA side, not the intercepting the call stack from the Blueprint. The old flow do the same but with different call path. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
我有 BP_Child 和 BP_Base,它们分别绑定到 Child.lua 和 Base.lua。Child.lua 和 Base.lua 都重写了 FunctionA()。当我在 BP_Child 中调用 FunctionA() 时,它导致了无限循环错误。根本原因是,当执行到 BP_Base 中的 FunctionA 时,由于 Base.lua 重写了 FunctionA(),UnLua 决定再次触发 FunctionA(),这就导致了一个无限循环。你可以看下面的图表来直观理解。
我在调用 LuaFunction 时添加了检查,判断调用的 ULuaFunction 是否来自父类,且与对象的 UClass 不是同一个类。这就是为什么我们跳过调用 Lua 端,而是调用被重写的函数,以防止继承相关的 bug。